package com.ibeeking.found.upms.service.common.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName CpPermissionDO
 * @Description
 * @Author ibeeking
 * @Date 2020-12-01 18:15
 **/
@Data
@TableName("upms_cp_permission")
public class CpPermissionDO implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 父级id
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 菜单名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * icon
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 菜单路径
     */
    @TableField(value = "route")
    private String route;

    /**
     * 打开类型，1-内部链接页面，2-外部链接页面
     */
    @TableField(value = "route_type")
    private Integer routeType;

    /**
     * 1-目录，2-菜单，3-按钮
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 按钮权限
     */
    @TableField(value = "permission")
    private String permission;

    /**
     * 打开方式，1-页签，2-新页面
     */
    @TableField(value = "target")
    private Integer target;

    /**
     * 菜单级别
     */
    @TableField(value = "level")
    private Integer level;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 是否启用，1-启用，0-未启用
     */
    @TableField(value = "publish_status")
    private Integer publishStatus;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    @TableField(value = "create_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(value = "create_by")
    private Long createBy;

}
